MacAlpin's treason is a medieval legend which explains the replacement of the Pictish language by Gaelic in the 9th and 10th centuries.
The legend tells of the murder of the nobles of Pictavia (situated in modern day Scotland). Kenneth MacAlpin's mother was probably descended from the royal house of Fortriu and his great-grand uncle, Alpín, had reigned as kings of the Picts until deposed by Óengus in 728. It is thus that Kenneth was one of several nobles with a claim to the crown of the Picts and Scots.
The sources of Kenneth MacAlpin becoming king of the Picts are few and suspect. Two such sources, the Prophecy of Berchán, and De Instructione Principus, note that in 841 Mac Alpin attacked the remnants of the Pictish army and defeated them. Mac Alpin then invited the Pictish king, Drest, and the remaining Pictish nobles to Scone to settle the issue of Dál Riata's freedom or MacAlpin's claim to the Dál Riatan crown. Faced with a recently victorious MacAlpin in the south and a devastated army in the north, Drest, as well as all claimants to the Pictish throne from the seven royal houses attended this meeting at Scone. Legend has it that the Gaels came secretly armed to Scone, where Drest and the Pictish nobles were killed.
It is Giraldus Cambrensis in De Instructione Principus who recounts how a great banquet was held at Scone, and the Pictish king and his nobles were plied with drinks and became quite drunk. Once the Picts were drunk, the Gaels allegedly pulled bolts from the benches, trapping the Picts in concealed earthen hollows under the benches; additionally, the traps were set with sharp blades, such that the falling Picts impaled themselves.
The Prophecy of Berchán tells that Mac Alpin plunged them in the pitted earth, sown with deadly blades. Trapped and unable to defend themselves, the surviving Picts were then murdered from above and their bodies, clothes and ornaments plundered.
Following this event, Kenneth MacAlpin became king of both realms, heralding back to his maternal ancestry to establish his claim to the throne of Pictavia and inheriting Dál Riada from his father. He merged the two into one body named Alba.